#ifndef SMOKE_H
#define SMOKE_H

#include <QObject>
#include<QPainter>
#include<QImage>
#include<QPixmap>
#include<QRandomGenerator>
#include<QApplication>
#include<mainwindow.h>
extern int randinum;

class Smoke : public QObject
{
    Q_OBJECT
public:
    explicit Smoke(QObject *parent = nullptr)
    {

    }
    Smoke(int h);
    bool isScore = false;
    void seth1(int h);
    void draw(QPainter &painter);
    void insmoke();
    void setx(int x1);
    int getx();
    int gety();
    int randa[20]={100,436,210,410,365,600,320,241,333,200,150,300,500,642,720,534,236,516,423,210};
    int h1=randa[randinum];//上部芙蓉王高
    int x=900;

    ~Smoke();
signals:

private:
    QImage furong;//芙蓉王图片
    QImage mirror;//镜像图片
    int Cwidth=250;//通道宽度
    int width=90;//芙蓉王宽度
    QPixmap fr1;
    QPixmap fr2;//上、下香烟


    int winHeight=900
        ,groundHeight=780;//窗口高度、上面的高度
    int y;

};

#endif // SMOKE_H
